import React from 'react';
import { Dropdown, Button, Icon, Menu } from 'antd';

const DropdownMenu = ({ menuOptions = [], onMenuClick }) => {
  const menu = menuOptions.map(item => <Menu.Item key={item.key}>{item.name}</Menu.Item>);
  return (
    <Dropdown
      overlay={<Menu onClick={onMenuClick}>{menu}</Menu>}
    >
      <Button style={{ border: 'none' }}>
        <Icon type="menu-fold" />
        <Icon type="down" />
      </Button>
    </Dropdown>);
};
export default DropdownMenu;
